import React from 'react';
import {Tag} from 'antd';

module.exports = [
  {
    key: 'id',
    title: 'ID',
    dataType: 'int',
    primary: true,
    showType: 'normal',
    showInTable: true,
    showInForm: true,
    disabled: true,
    render: (text, record) => text
  },

  {
    key: 'title',
    title: '标签名',
    dataType: 'varchar',
    validator: [{required: true, message: '此项必填'}],
  },
  {
    key: 'color',
    title: '颜色',
    dataType: 'varchar',
    showType: 'color',
    render: (text) => <Tag color={text}>{text}</Tag>
  },
  {
    key: 'createTime',
    title: '创建时间',
    dataType: 'varchar',
    showInForm: false
  },
  {
    key: 'updateTime',
    title: '修改时间',
    dataType: 'varchar',
    showInForm: false
  }
];